'''
Created on 17.08.2011

@author: osman
'''

from pets_ontology import Pets, Pet, Dog, Cat

@Pets.atomic
def isDog(pet: Pet):
    return isinstance(pet, Dog)

Pets.eraseGraph()
with Pets:
    Oscar = Cat("Oscar")
    Max = Dog("Max")
    isDog(Max)
    # following arc should not be added:
    isDog(Oscar)

for x in Pets.graph: print(x)
